/* **
*电话验证
 */
/* 手机号码验证 */
const ph_ex = /^(0|86|17951)?(1[23456789])[0-9]{9}$/;
/* 座机验证 */
const mb_ex = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
export {
    ph_ex,
    mb_ex
}
export const validateContent = (rule, value, callback) => {
    if (value === '') {
        callback();
    } else {
        if (ph_ex.test(value) || mb_ex.test(value)) {
            return callback();
        }
        callback('格式不正确（区号、分机号以‘-’分割）！');
    }
};
export const card = [
    { pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证校验不正确', trigger: 'blur' }
];

export const passWord =[
        { pattern: /^[0-9a-zA-Z_]{6,16}$/, message: '只能是数字、字母、下划线(6~16位)', trigger: 'blur' }
    ];

